import Vue from 'vue'
import Router from 'vue-router'




import login from '@/pages/login/login.vue'
import selStore from '@/pages/selStore/index.vue'
import resetPassword from '@/pages/resetPassword/resetPassword.vue'
import index from '@/pages/index/index.vue'
import order from '@/components/order/order.vue'
import earnings from '@/components/earnings/earnings.vue'
import buySuccess from '@/components/buySuccess/buySuccess.vue'
import buySuccessForRent from '@/components/buySuccessForRent/buySuccess.vue'
import orderDetail from '@/components/order/orderDetail/orderDetail.vue'
import takeOrder from '@/components/takeOrder/takeOrder.vue'
import coupon from '@/components/coupon/coupon.vue'
import couponDetail from '@/components/coupon/couponDetail/couponDetail.vue'
import check from '@/components/check/check.vue'
import workshift from '@/components/workshift/workshift.vue'
import achievement from '@/components/achievement/achievement.vue'
import workDetail from '@/components/workshift/workDetail/workDetail.vue'
import workOrderDetail from '@/components/workshift/workOrderDetail/workOrderDetail.vue'
import reward from "@/components/reward/reward.vue"
import region from "@/components/region/region.vue"
import sendOrder from "@/components/sendOrder/order.vue"
import waitSite from "@/components/waitSite/index.vue"
import rentOrder from "@/components/rentOrder/index.vue"
import returnRent from "@/components/returnRent/index.vue"
import bigScreen from "@/components/bigScreen/index.vue"



Vue.use(Router)


export default new Router({
    routes: [
        {
            //重定向
            path: '*',
            redirect: '/index'
        },
        {
            path: '/login',
            name: 'login',
            component: login
        },
        {
            path: '/selStore',
            name: 'selStore',
            component: selStore
        },
        {
            path: '/resetPassword',
            name: 'resetPassword',
            component: resetPassword
        },
        {
            path: '/index',
            name: 'index',
            component: index
        },
        {
            path: '/buySuccessForRent',
            name: 'buySuccessForRent',
            component: buySuccessForRent
        },
        {
            path: '/buySuccess/:id',
            name: 'buySuccess',
            component: buySuccess
        },
        {
            path: '/orderDetail/:id',
            name: 'orderDetail',
            component: orderDetail
        },
        {
            path: '/order',
            name: 'order',
            component: order,
            children:[

            ]   
        },
        {
            path: '/waitSite',
            name: 'waitSite',
            component: waitSite
        },
        {
            path: '/rentOrder',
            name: 'rentOrder',
            component: rentOrder
        },
        {
            path: '/returnRent',
            name: 'returnRent',
            component: returnRent
        },
        {
            path: '/bigScreen',
            name: 'bigScreen',
            component: bigScreen
        },
        {
            path: '/sendOrder',
            name: 'sendOrder',
            component: sendOrder,
            children:[]   
        }
        ,{//收益
            path: '/earnings',
            name: 'earnings',
            component: earnings,
            children:[

            ]	
        },
        {//打赏收益
            path: '/reward',
            name: 'reward',
            component: reward,
            children:[
            ]	
        },
        {
            path: '/region',
            name: 'region',
            component: region,
             children:[

            ]
        },
        {
            path: '/takeOrder',
            name: 'takeOrder',
            component: takeOrder,
             children:[

            ]
        },
        {
            path: '/achievement',
            name: 'achievement',
            component: achievement,
             children:[

            ]
        },
        {
            path: '/coupon',
            name: 'coupon',
            component: coupon
        },
        {
            path: '/couponDetail/:id',
            name: 'couponDetail',
            component: couponDetail
        },
        {
            path: '/check',
            name: 'check',
            component: check
        },
        {
            path: '/workshift',
            name: 'workshift',
            component: workshift
        },
        {
            path: '/workDetail/:id',
            name: 'workDetail',
            component: workDetail
        },
        {
            path: '/workOrderDetail/:id',
            name: 'workOrderDetail',
            component: workOrderDetail
        }
    ]
})